package com.blfq.common.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class loadBanner {
    public static void printBanner() {
        // 使用类加载器读取 resources 目录下的 banner.txt
        InputStream inputStream = loadBanner.class.getClassLoader().getResourceAsStream("banner.txt");

        if (inputStream == null) {
            System.err.println("[ERROR]没有找到banner.txt文件");
            return;
        }

        try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
            String line;
            while ((line = reader.readLine()) != null) {
                System.out.println(line);
            }
        } catch (IOException e) {
            System.err.println("[Error]在读取banner.txt文件时出现异常: " + e.getMessage());
        }
    }
}
